package cn.newhopedairy.delivery.api.assembly;

import cn.newhopedairy.delivery.infrastructure.db.po.DeliveryOrderPo;
import cn.newhopedairy.delivery.response.DeliveryOrderResp;
import org.mapstruct.Mapper;

import java.util.List;

/**
 * @author Neo.Li
 * @date 2020-09-2515:37
 */
@Mapper(componentModel = "spring")
public interface DeliveryOrderRespAssembly {
    /**
     * 数据库Po对象转换为Resp对象
     *
     * @param deliveryOrderPo Po转Resp
     * @return Resp对象
     */
    DeliveryOrderResp toResp(DeliveryOrderPo deliveryOrderPo);

    /**
     * 数据库Po对象转换为Resp对象List
     *
     * @param deliveryOrderPos Po转Resp List
     * @return Resp对象List
     */
    List<DeliveryOrderResp> toRespList(List<DeliveryOrderPo> deliveryOrderPos);
}
